package com.threeti.mecool.core.domain.model.basicdata.biz;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;

/** 通路，即终端 */
@Embeddable
public class Channel implements Serializable {
  @Column(name="CHANNEL_CODE")
  private String code;
  
  @Column(name="CHANNEL_NAME")
  private String name;

  @Embedded
//  @AttributeOverride(name="code", column=@Column(name="CHANNEL_CAT_CODE"))
  private ChannelCategory category;
  
  @Column(name="CHANNEL_SYS_CAT")
  private String sysCategory;
  
  @Column(name="CHANNEL_ADMIN_DIV_ID")
  private String adminDivId;

  public Channel(String code, String name, ChannelCategory category, String sysCategory, String adminDivId) {
    super();
    this.code = code;
    this.name = name;
    this.category = category;
    this.sysCategory = sysCategory;
    this.adminDivId = adminDivId;
  }

  public String getCode() {
    return code;
  }

  public String getName() {
    return name;
  }

  public ChannelCategory getCategory() {
    return category;
  }

  public String getSysCategory() {
    return sysCategory;
  }

  public String getAdminDivId() {
    return adminDivId;
  }

  @Override
  public String toString() {
    return "Channel [code=" + code + ", name=" + name + ", category=" + category + ", sysCategory=" + sysCategory + ", adminDivId=" + adminDivId
        + "]";
  }

  Channel() {
    super();
  }
  
  
}
